package com.byb.server.service.dto;

import java.io.Serializable;
import java.util.Objects;

public class IllnessDTO implements Serializable {

    private Long id;

    private String illnessName;

    private Integer incidence;

    public IllnessDTO() {
    }

    public IllnessDTO(Long id, String illnessName, Integer incidence) {
        this.id = id;
        this.illnessName = illnessName;
        this.incidence = incidence;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getIllnessName() {
        return illnessName;
    }

    public void setIllnessName(String illnessName) {
        this.illnessName = illnessName;
    }

    public Integer getIncidence() {
        return incidence;
    }

    public void setIncidence(Integer incidence) {
        this.incidence = incidence;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof IllnessDTO)) return false;
        IllnessDTO that = (IllnessDTO) o;
        return Objects.equals(getId(), that.getId());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getId());
    }

    @Override
    public String toString() {
        return "IllnessDTO{" +
            "id=" + id +
            ", illnessName='" + illnessName + '\'' +
            ", incidence=" + incidence +
            '}';
    }
}
